
#ifndef _MEMBER_BTEXTUAL_H_
#define _MEMBER_BTEXTUAL_H_

#include <BQuad>
#include <BRect>
#include <BVector>
#include <BImage>
#include <BTextual>
#include "ILineBlock.h"

#define textual_member(textual)		((member_BTextual*)((BTextual*)textual)->_ptr)

namespace BWE
{
	class CodeQuad
	{
	public:
		BQuad			quad;
		BImageHolder	image;
		BQuad			imageQuad;
	};

	class member_BTextual
	{
		friend class BTextual;
	public:
		member_BTextual(BTextual* billboard);
		~member_BTextual();

		void freshTextSize();
		void rebuild();

		BTextual*			boss;
		BRealSize			size;
		BVector				right;
		BVector				down;
		BQuad				quad;
		Align				originAlign;
		BString				text;
		bool				dirtyText;
		Align				align;
		BFontHolder			font;
		BReal				glyphSize;
		BColorArrayHolder	colors;
		BRealSize			textSize;
		BQuad				textQuad;
		BArray<CodeQuad>	items;
	};
}

#endif
